<?php

/**
 * Description of minifiedApplyForm
 *
 * @author Tazenda
 */

require_once(sfConfig::get('sf_plugins_dir').'/sfDoctrineApplyPlugin/lib/form/sfApplyApplyForm.class.php');

class minifiedApplyForm extends sfApplyApplyForm {
    
    private $validate = null;

    public function configure()
    {
        parent::configure();
        
        unset($this['email2'], $this['password2']);
        
        $this->setWidget('fullname', new sfWidgetFormInputHidden());
        
        $this->setWidget('username', new sfWidgetFormInputHidden());
        
        $this->setWidget('type', new sfWidgetFormInputHidden());
        
        $this->setValidator('type', new sfValidatorChoice(array('choices' => array('twitter','facebook','google'))));
        
        $this->setWidget('token', new sfWidgetFormInputHidden());
        
        $this->setValidator('token', new sfValidatorString());
        
        $this->setWidget('secret', new sfWidgetFormInputHidden());
        
        $this->setValidator('secret', new sfValidatorString());
        
        $this->widgetSchema->setNameFormat('minifiedApply[%s]');
    }
}